package org.locker.domain.bo;

import org.locker.domain.DividendRecord;
import org.locker.common.mybatis.core.domain.BaseEntity;
import org.locker.common.core.validate.*;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;

/**
 * 管理员分润记录业务对象 lk_dividend_record
 *
 * @author winnie
 * @date 2023-10-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = DividendRecord.class, reverseConvertGenerate = false)
public class DividendRecordBo extends BaseEntity {

    /**
     * 分润记录
     */
    @NotNull(message = "分润记录不能为空", groups = { EditGroup.class })
    private Long dividendId;

    /**
     * 场地ID
     */
    @NotNull(message = "场地ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long positionId;

    /**
     * 管理员ID
     */
    @NotNull(message = "管理员ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long managerId;

    /**
     * 代理商id
     */
    private Long parentManagerId;

    /**
     * 订单编号
     */
    @NotBlank(message = "订单编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderNo;

    /**
     * 订单价格
     */
    @NotNull(message = "订单价格不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal amount;

    /**
     * 代理商分成
     */
    @NotNull(message = "价格不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal dividendParentAmount;

    /**
     * 平台分成
     */
    private BigDecimal dividendPlatformAmount;

    /**
     * 管理员分成
     */
    private BigDecimal dividendManagerAmount;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;


}
